/*
 *@功能: 小组消息列表
 *@author: lovecrosszhu
 *@date: 2021-02-03 15:59:13
 *@version: V1.0.0
*/
class GroupMessage {
  int status;
  String message;
  List<Message> data;

  GroupMessage({this.status, this.message, this.data});

  GroupMessage.fromJson(Map<String, dynamic> json) {
    status = json['status'];
    message = json['message'];
    if (json['data'] != null) {
      data = new List<Message>();
      json['data'].forEach((v) {
        data.add(new Message.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['status'] = this.status;
    data['message'] = this.message;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Message {
  String sId;
  String createrId;
  String note;
  String groupId;
  String createdTime;
  String updatedTime;
  int iV;

  Message(
      {this.sId,
      this.createrId,
      this.note,
      this.groupId,
      this.createdTime,
      this.updatedTime,
      this.iV});

  Message.fromJson(Map<String, dynamic> json) {
    sId = json['_id'];
    createrId = json['creater_id'];
    note = json['note'];
    groupId = json['group_id'];
    createdTime = json['created_time'];
    updatedTime = json['updated_time'];
    iV = json['__v'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['_id'] = this.sId;
    data['creater_id'] = this.createrId;
    data['note'] = this.note;
    data['group_id'] = this.groupId;
    data['created_time'] = this.createdTime;
    data['updated_time'] = this.updatedTime;
    data['__v'] = this.iV;
    return data;
  }
}
